package lab02.test06;

import java.util.Scanner;

/**
 * Created by 阿阿阿阿豪丶 on 2017/10/15.
 */
public class Circle {
    public static void main(String[] args) {
        double radius;
        System.out.println("请输入圆的半径");
        Scanner circle = new Scanner(System.in);
        radius = circle.nextInt();
        System.out.println("圆的面积为：" + area(radius));
        System.out.println("圆的周长为：" + perimeter(radius));
    }

    static double area(double radius) {
        double area = Math.PI * radius * radius;
        return area;

    }

    static double perimeter(double radius) {
        double perimeter = 2 * Math.PI * radius;
        return perimeter;
    }
}
